Fix sticky Shift when handwriting view is hidden#194
Merged
LeanBitLab merged 1 commit intoJun 22, 2026
Conversation
This was referenced Jun 22, 2026
Merge upstream LeanType v3.8.6 (handwriting, llama.cpp/GGUF, touchpad gestures)
AsafMah/LeanType#109
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #186.
The v3.8.6 handwriting integration stops the handwriting view on every main-keyboard frame switch:
stopHandwriting()closes the handwriting bottom-row keyboard (bottomRowKeyboard.closing()), which callsMainKeyboardView.cancelAllOngoingEvents()and globally cancels activePointerTrackers. When the user taps Shift, the keyboard switches to the manual-shift layout while the Shift pointer is still down; the unconditional handwriting cleanup cancels that Shift pointer before its ACTION_UP is delivered. The Shift state remains PRESSING/CHORDING, so typing stays uppercase until the keyboard is reset.Only stop the handwriting view when it is actually shown. If it is already hidden, just keep it hidden without closing its bottom-row keyboard / cancelling global pointer trackers.
Verification
KeyboardState, thenPointerTrackerQueue.cancelAllPointerTrackers()cancelled the Shift pointer before release; subsequent letters arrived with Shift in CHORDING state../gradlew.bat compileStandardRunTestsKotlin --no-daemon --console=plainpasses on this upstream-based branch (withANDROID_HOME=C:\Android\Sdk).